<%@ page import="java.util.*" import="SiTuQingYou.vo.*,SiTuQingYou.util.*" language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%String path = request.getContextPath(); %>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
<style type="text/css">
	#page{width:100%;height:120vh;}
	#title{text-align:center;width:100%;height:100px;line-height:100px;color:darkcyan;}
	#scenes{width:100%;overflow:hidden;}
	#scenes ul{margin-top:0px;padding-left:0px;list-style:none;}
	#scenes li{text-align:center;float:left;width:330px;height:300px;line-height:30px;border:2px solid black;background-color:#ddd;margin:20px 20px;}
	#scenes img{width:326px;height:240px;}
	.pager a{display:inline-block; width:40px;height:40px;background-color:gray;color:white;text-align:center;line-height:40px;border-radius:18px;text-decoration:none;}
	.pager a.cur{background-color:green;}
</style>
</head>
<body>
<jsp:include page="header.jsp"></jsp:include>
<div id="page">
<div id="title"><font size="10px" face="隶书"><a style="text-decoration:none;color:darkcyan;" href="<%=path %>/index/city.jsp">山东省景点一览</a></font></div>
<div id="scenes">
	<jsp:include page="/GetAllSceneServlet"><jsp:param value="getallscene" name="method"/></jsp:include>
	<%
	Object o = request.getAttribute("scenes");
	ArrayList<Scene> scenes = (ArrayList<Scene>)o;
	Object b = request.getAttribute("pics");
	ArrayList<String> pics = (ArrayList<String>)b;
	Pager pager = (Pager) request.getAttribute("pager");
	%>
	<ul>
	<%
	for(int i=0;i<scenes.size();i++)
	{
		Scene scene = scenes.get(i);
		String pic = pics.get(i);
		%>
		<li><a style="text-decoration:none;color:darkcyan;" href="<%=path%>/index/sceneinfo.jsp?method=sceneinfo&id=<%=scene.getId()%>"><img id="img" src="<%=path %>/images/<%=pic %>"><%=scene.getScenename() %></a></li>
		<%
	}
	%>
	</ul>
</div>
<div class="pager">
         <%
           for(int i=1;i<=pager.getPageCount();i++)
           {%>
              <a href="<%=path%>/index/allscenes.jsp?pageNum=<%=i%>" class=<%=(i==pager.getPageNum()?"cur":"")%>><%=i%></a>
           
          <%}%>
                         共<%=pager.getPageCount() %>页   共<%=pager.getDataCount() %>记录
</div>	
</div>
<jsp:include page="footer.jsp"></jsp:include>
</body>
</html>